
const BgmGuidList:string[] = ['131499', '146249', '146250', '146151', '136668']

export class SoundModuleC extends ModuleC<SoundModuleS, null>{
    private bgmSound:Sound
    private currentPlayBgmIndex:number = 0
    
    protected onStart(): void {
        this.bgmSound = GameObject.spawn("Sound",{replicates:false})
        this.bgmSound.setSoundAsset(BgmGuidList[this.currentPlayBgmIndex])
        this.bgmSound.volume = 0.4
        this.bgmSound.play(0,()=>{
            this.currentPlayBgmIndex = (this.currentPlayBgmIndex + 1) % BgmGuidList.length
            this.bgmSound.setSoundAsset(BgmGuidList[this.currentPlayBgmIndex])
            this.bgmSound.play();
        })
    }
}

export class SoundModuleS extends ModuleS<SoundModuleC, null>{
    
}